package com.zf.shuashua.bean;

import com.zf.shuashua.advert.AdvertConstants;

import java.io.Serializable;

public class ConfigAdvertList implements Serializable {
    //开屏广告
    private ConfigAdvert android_advert_open;
    //信息流
    private ConfigAdvert android_advert_draw;
    //激励广告-会员签到
    private ConfigAdvert android_advert_reward_sign;
    //激励广告-自动播放
    private ConfigAdvert android_advert_reward_auto;
    //激励广告-限次奖励
    private ConfigAdvert android_advert_reward_limit;
    //激励广告-首次观看
    private ConfigAdvert android_advert_reward_first;
    //激励广告-分享任务
    private ConfigAdvert android_advert_reward_share;
    //激励广告-点赞视频
    private ConfigAdvert android_advert_reward_likes;
    //激励广告-绑定微信
    private ConfigAdvert android_advert_reward_wechat;
    //激励广告-开启推送
    private ConfigAdvert android_advert_reward_push;
    //激励广告-限时登录
    private ConfigAdvert android_advert_reward_login;
    //激励广告-首页宝箱
    private ConfigAdvert android_advert_reward_chest;
    //激励广告-长豆评价
    private ConfigAdvert android_advert_reward_comment;
    //信息流贴片广告-提现弹窗
    private ConfigAdvert android_advert_patch_cash;
    //信息流贴片广告-通用弹窗
    private ConfigAdvert android_advert_patch_common;
    //信息流贴片广告-首页泡泡
    private ConfigAdvert android_advert_patch_bubble;
    //信息流贴片广告-奖励弹窗
    private ConfigAdvert android_advert_patch_reward;
    private ConfigAdvert channel_vivo_open;
    private ConfigAdvert channel_huawei_open;
    //开屏广告误触配置
    private ConfigAdvertOpen android_start_ad_mistake_open;
    //热启动广告配置
    private ConfigAdvertHot android_hot_start_open;
    //激励视频来源总开关: 0：后台控制 1：1：1切换
    private ConfigAdvert android_advert_source_status;

    public boolean isSelfRewardAuto() {
        if (android_advert_reward_auto != null) {
            return "1".equals(android_advert_reward_auto.getSource());
        }
        return false;
    }

    // true:1：1切换 切换
    public boolean isSelfControl() {
        if (android_advert_source_status != null) {
            return android_advert_source_status.isOpen();
        }
        return false;
    }

    public boolean isSelfRewardByType(String advertType) {
        boolean isSelf = false;
        switch (advertType) {
            case AdvertConstants.REWARD_TYPE_PUNCH:
                if (android_advert_reward_sign != null) {
                    isSelf = "1".equals(android_advert_reward_sign.getSource());
                }
                break;
            case AdvertConstants.REWARD_TYPE_TASK:
                if (android_advert_reward_limit != null) {
                    isSelf = "1".equals(android_advert_reward_limit.getSource());
                }
                break;
            case AdvertConstants.REWARD_TYPE_AUTO:
                if (android_advert_reward_auto != null) {
                    isSelf = "1".equals(android_advert_reward_auto.getSource());
                }
                break;
            case AdvertConstants.REWARD_TYPE_SHARE:
                if (android_advert_reward_share != null) {
                    isSelf = "1".equals(android_advert_reward_share.getSource());
                }
                break;
            case AdvertConstants.REWARD_TYPE_FIRST:
                if (android_advert_reward_first != null) {
                    isSelf = "1".equals(android_advert_reward_first.getSource());
                }
                break;
            case AdvertConstants.REWARD_TYPE_LIKE:
                if (android_advert_reward_likes != null) {
                    isSelf = "1".equals(android_advert_reward_likes.getSource());
                }
                break;
            case AdvertConstants.REWARD_TYPE_BIND:
            case AdvertConstants.REWARD_TYPE_BIND_QQ:
            case AdvertConstants.REWARD_TYPE_BIND_WEIBO:
                if (android_advert_reward_wechat != null) {
                    isSelf = "1".equals(android_advert_reward_wechat.getSource());
                }
                break;
            case AdvertConstants.REWARD_TYPE_NOTIFICATION:
                if (android_advert_reward_push != null) {
                    isSelf = "1".equals(android_advert_reward_push.getSource());
                }
                break;
            case AdvertConstants.REWARD_TYPE_NEW_WITHDRAW:
            case AdvertConstants.REWARD_TYPE_GAME:
            case AdvertConstants.REWARD_TYPE_TIME_LIMIT:
                if (android_advert_reward_login != null) {
                    isSelf = "1".equals(android_advert_reward_login.getSource());
                }
                break;
            case AdvertConstants.REWARD_TYPE_APPRAISE:
                if (android_advert_reward_comment != null) {
                    isSelf = "1".equals(android_advert_reward_comment.getSource());
                }
                break;
            case AdvertConstants.REWARD_TYPE_BUBBLE:
                if (android_advert_reward_chest != null) {
                    isSelf = "1".equals(android_advert_reward_chest.getSource());
                }
                break;
            default:
                isSelf = false;
        }
        return isSelf;
    }

    public boolean isTencentRewardByType(String advertType) {
        boolean isTencent = false;
        switch (advertType) {
            case AdvertConstants.REWARD_TYPE_PUNCH:
                if (android_advert_reward_sign != null) {
                    isTencent = "3".equals(android_advert_reward_sign.getSource());
                }
                break;
            case AdvertConstants.REWARD_TYPE_TASK:
                if (android_advert_reward_limit != null) {
                    isTencent = "3".equals(android_advert_reward_limit.getSource());
                }
                break;
            case AdvertConstants.REWARD_TYPE_AUTO:
                if (android_advert_reward_auto != null) {
                    isTencent = "3".equals(android_advert_reward_auto.getSource());
                }
                break;
            case AdvertConstants.REWARD_TYPE_SHARE:
                if (android_advert_reward_share != null) {
                    isTencent = "3".equals(android_advert_reward_share.getSource());
                }
                break;
            case AdvertConstants.REWARD_TYPE_FIRST:
                if (android_advert_reward_first != null) {
                    isTencent = "3".equals(android_advert_reward_first.getSource());
                }
                break;
            case AdvertConstants.REWARD_TYPE_LIKE:
                if (android_advert_reward_likes != null) {
                    isTencent = "3".equals(android_advert_reward_likes.getSource());
                }
                break;
            case AdvertConstants.REWARD_TYPE_BIND:
            case AdvertConstants.REWARD_TYPE_BIND_QQ:
            case AdvertConstants.REWARD_TYPE_BIND_WEIBO:
                if (android_advert_reward_wechat != null) {
                    isTencent = "3".equals(android_advert_reward_wechat.getSource());
                }
                break;
            case AdvertConstants.REWARD_TYPE_NOTIFICATION:
                if (android_advert_reward_push != null) {
                    isTencent = "3".equals(android_advert_reward_push.getSource());
                }
                break;
            case AdvertConstants.REWARD_TYPE_NEW_WITHDRAW:
            case AdvertConstants.REWARD_TYPE_GAME:
            case AdvertConstants.REWARD_TYPE_TIME_LIMIT:
                if (android_advert_reward_login != null) {
                    isTencent = "3".equals(android_advert_reward_login.getSource());
                }
                break;
            case AdvertConstants.REWARD_TYPE_APPRAISE:
                if (android_advert_reward_comment != null) {
                    isTencent = "3".equals(android_advert_reward_comment.getSource());
                }
                break;
            case AdvertConstants.REWARD_TYPE_BUBBLE:
                if (android_advert_reward_chest != null) {
                    isTencent = "3".equals(android_advert_reward_chest.getSource());
                }
                break;
            default:
                isTencent = false;
        }
        return isTencent;
    }

    public boolean isTencentNativeByType(String advertType) {
        boolean isTencent = false;
        switch (advertType) {
            case AdvertConstants.NATIVE_TYPE_COMMON:
                if (android_advert_patch_common != null) {
                    isTencent = "3".equals(android_advert_patch_common.getSource());
                }
                break;
            case AdvertConstants.NATIVE_TYPE_BUBBLE:
                if (android_advert_patch_bubble != null) {
                    isTencent = "3".equals(android_advert_patch_bubble.getSource());
                }
                break;
            case AdvertConstants.NATIVE_TYPE_ENCOURAGE:
                if (android_advert_patch_reward != null) {
                    isTencent = "3".equals(android_advert_patch_reward.getSource());
                }
                break;
            case AdvertConstants.NATIVE_TYPE_WITHDRAW:
                if (android_advert_patch_cash != null) {
                    isTencent = "3".equals(android_advert_patch_cash.getSource());
                }
                break;
        }
        return isTencent;
    }

    public boolean isNativeOpenByType(String advertType) {
        boolean isOpen = false;
        switch (advertType) {
            case AdvertConstants.NATIVE_TYPE_COMMON:
                if (android_advert_patch_common != null) {
                    isOpen = android_advert_patch_common.isOpen();
                }
                break;
            case AdvertConstants.NATIVE_TYPE_BUBBLE:
                if (android_advert_patch_bubble != null) {
                    isOpen = android_advert_patch_bubble.isOpen();
                }
                break;
            case AdvertConstants.NATIVE_TYPE_ENCOURAGE:
                if (android_advert_patch_reward != null) {
                    isOpen = android_advert_patch_reward.isOpen();
                }
                break;
            case AdvertConstants.NATIVE_TYPE_WITHDRAW:
                if (android_advert_patch_cash != null) {
                    isOpen = android_advert_patch_cash.isOpen();
                }
                break;
        }
        return isOpen;
    }

    public boolean isBaiduNativeByType(String advertType) {
        boolean isTencent = false;
        switch (advertType) {
            case AdvertConstants.NATIVE_TYPE_COMMON:
                if (android_advert_patch_common != null) {
                    isTencent = "4".equals(android_advert_patch_common.getSource());
                }
                break;
            case AdvertConstants.NATIVE_TYPE_BUBBLE:
                if (android_advert_patch_bubble != null) {
                    isTencent = "4".equals(android_advert_patch_bubble.getSource());
                }
                break;
            case AdvertConstants.NATIVE_TYPE_ENCOURAGE:
                if (android_advert_patch_reward != null) {
                    isTencent = "4".equals(android_advert_patch_reward.getSource());
                }
                break;
            case AdvertConstants.NATIVE_TYPE_WITHDRAW:
                if (android_advert_patch_cash != null) {
                    isTencent = "4".equals(android_advert_patch_cash.getSource());
                }
                break;
        }
        return isTencent;
    }

    public ConfigAdvert getAndroid_advert_open() {
        return android_advert_open;
    }

    public void setAndroid_advert_open(ConfigAdvert android_advert_open) {
        this.android_advert_open = android_advert_open;
    }

    public ConfigAdvert getAndroid_advert_draw() {
        return android_advert_draw;
    }

    public void setAndroid_advert_draw(ConfigAdvert android_advert_draw) {
        this.android_advert_draw = android_advert_draw;
    }

    public ConfigAdvert getAndroid_advert_reward_sign() {
        return android_advert_reward_sign;
    }

    public void setAndroid_advert_reward_sign(ConfigAdvert android_advert_reward_sign) {
        this.android_advert_reward_sign = android_advert_reward_sign;
    }

    public ConfigAdvert getAndroid_advert_reward_auto() {
        return android_advert_reward_auto;
    }

    public void setAndroid_advert_reward_auto(ConfigAdvert android_advert_reward_auto) {
        this.android_advert_reward_auto = android_advert_reward_auto;
    }

    public ConfigAdvert getAndroid_advert_reward_limit() {
        return android_advert_reward_limit;
    }

    public void setAndroid_advert_reward_limit(ConfigAdvert android_advert_reward_limit) {
        this.android_advert_reward_limit = android_advert_reward_limit;
    }

    public ConfigAdvert getAndroid_advert_reward_first() {
        return android_advert_reward_first;
    }

    public void setAndroid_advert_reward_first(ConfigAdvert android_advert_reward_first) {
        this.android_advert_reward_first = android_advert_reward_first;
    }

    public ConfigAdvert getAndroid_advert_reward_share() {
        return android_advert_reward_share;
    }

    public void setAndroid_advert_reward_share(ConfigAdvert android_advert_reward_share) {
        this.android_advert_reward_share = android_advert_reward_share;
    }

    public ConfigAdvert getAndroid_advert_reward_likes() {
        return android_advert_reward_likes;
    }

    public void setAndroid_advert_reward_likes(ConfigAdvert android_advert_reward_likes) {
        this.android_advert_reward_likes = android_advert_reward_likes;
    }

    public ConfigAdvert getAndroid_advert_reward_wechat() {
        return android_advert_reward_wechat;
    }

    public void setAndroid_advert_reward_wechat(ConfigAdvert android_advert_reward_wechat) {
        this.android_advert_reward_wechat = android_advert_reward_wechat;
    }

    public ConfigAdvert getAndroid_advert_reward_push() {
        return android_advert_reward_push;
    }

    public void setAndroid_advert_reward_push(ConfigAdvert android_advert_reward_push) {
        this.android_advert_reward_push = android_advert_reward_push;
    }

    public ConfigAdvert getAndroid_advert_reward_login() {
        return android_advert_reward_login;
    }

    public void setAndroid_advert_reward_login(ConfigAdvert android_advert_reward_login) {
        this.android_advert_reward_login = android_advert_reward_login;
    }

    public ConfigAdvert getAndroid_advert_reward_chest() {
        return android_advert_reward_chest;
    }

    public void setAndroid_advert_reward_chest(ConfigAdvert android_advert_reward_chest) {
        this.android_advert_reward_chest = android_advert_reward_chest;
    }

    public ConfigAdvert getAndroid_advert_reward_comment() {
        return android_advert_reward_comment;
    }

    public void setAndroid_advert_reward_comment(ConfigAdvert android_advert_reward_comment) {
        this.android_advert_reward_comment = android_advert_reward_comment;
    }

    public ConfigAdvert getAndroid_advert_patch_cash() {
        return android_advert_patch_cash;
    }

    public void setAndroid_advert_patch_cash(ConfigAdvert android_advert_patch_cash) {
        this.android_advert_patch_cash = android_advert_patch_cash;
    }

    public ConfigAdvert getAndroid_advert_patch_common() {
        return android_advert_patch_common;
    }

    public void setAndroid_advert_patch_common(ConfigAdvert android_advert_patch_common) {
        this.android_advert_patch_common = android_advert_patch_common;
    }

    public ConfigAdvert getAndroid_advert_patch_bubble() {
        return android_advert_patch_bubble;
    }

    public void setAndroid_advert_patch_bubble(ConfigAdvert android_advert_patch_bubble) {
        this.android_advert_patch_bubble = android_advert_patch_bubble;
    }

    public ConfigAdvert getAndroid_advert_patch_reward() {
        return android_advert_patch_reward;
    }

    public void setAndroid_advert_patch_reward(ConfigAdvert android_advert_patch_reward) {
        this.android_advert_patch_reward = android_advert_patch_reward;
    }

    public ConfigAdvert getChannel_vivo_open() {
        return channel_vivo_open;
    }

    public void setChannel_vivo_open(ConfigAdvert channel_vivo_open) {
        this.channel_vivo_open = channel_vivo_open;
    }

    public ConfigAdvert getChannel_huawei_open() {
        return channel_huawei_open;
    }

    public void setChannel_huawei_open(ConfigAdvert channel_huawei_open) {
        this.channel_huawei_open = channel_huawei_open;
    }

    public ConfigAdvertOpen getAndroid_start_ad_mistake_open() {
        return android_start_ad_mistake_open;
    }

    public void setAndroid_start_ad_mistake_open(ConfigAdvertOpen android_start_ad_mistake_open) {
        this.android_start_ad_mistake_open = android_start_ad_mistake_open;
    }

    public ConfigAdvertHot getAndroid_hot_start_open() {
        return android_hot_start_open;
    }

    public void setAndroid_hot_start_open(ConfigAdvertHot android_hot_start_open) {
        this.android_hot_start_open = android_hot_start_open;
    }

    public ConfigAdvert getAndroid_advert_source_status() {
        return android_advert_source_status;
    }

    public void setAndroid_advert_source_status(ConfigAdvert android_advert_source_status) {
        this.android_advert_source_status = android_advert_source_status;
    }
}
